<!DOCTYPE html>
<html>

  <head>
    <meta charset='utf-8'>
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <meta name="description" content="AndroidSVG : SVG rendering library for Android">

    <link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">

    <title>AndroidSVG</title>
  </head>

  <body>

    <!-- HEADER -->
    <div id="header_wrap" class="outer">
        <header class="inner">
          <a id="forkme_banner" href="https://github.com/BigBadaboom/androidsvg">View on GitHub</a>

          <a href="index.html"><img id="project_logo" src="images/AndroidSVG_logo.svg" title="AndroidSVG logo"/></a>
          <h1 id="project_title">AndroidSVG</h1>
          <h2 id="project_tagline">SVG rendering library for Android</h2>

        </header>
    </div>

    <!-- MAIN CONTENT -->
    <div id="main_content_wrap" class="outer">
      <div class="inner">
        <nav>
          <ul>
            <li><a href="index.html">Home</a></li>
            <li><a href="download.html">Download</a></li>
            <li><a href="release_notes.html">Release Notes</a></li>
            <li><a href="doc/index.html">Javadoc</a></li>
            <li><a href="documentation.html">Documentation</a></li>
            <li><a href="svg_implementation_details.html">SVG Implementation</a></li>
            <li><a href="faq.html">FAQ</a></li>
            <li><a href="known_issues.html">Known Issues</a></li>
            <li><a href="report_bugs.html">Report a bug</a></li>
            <li><a href="mailto:androidsvgfeedback@gmail.com">Contact the author</a></li>
          </ul>

          <p><em><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License v2.0</a></em></p>

          <p><a href="https://twitter.com/AndroidSVG"><img src="images/twitter.png"></a></p>
        </nav>
        <section id="main_content">
        <h1><a id="androidsvg" class="anchor" href="#androidsvg" aria-hidden="true"><span class="octicon octicon-link"></span></a>SVG Implementation Details</h1>






<p>
AndroidSVG supports almost all of the graphical features defined in the SVG 1.1 and SVG 1.2 Tiny specifications.  The main missing features are animation, filters and SVG fonts.
AndroidSVG is intended only as a static renderer, so animation will probably never be added. However filters and embedded fonts may be supported in the future.
</p>

<p>A lot of effort has been put into making AndroidSVG's rendering accurate.  For example, AndroidSVG correctly renders the <a href="http://www.codedread.com/acid/acid1.html" rel="nofollow">SVG Acid Test</a>.
</p>

<p>
<img src="images/svg_acid_test.png">
</p>

<p>
SVG Acid test. <em>Note that this file has been slightly modified in that one CSS selector type that is not currently supported was converted to a style attribute.</em>
</p>


<h2><a name="Elements"></a>Elements<a href="#Elements" class="section_anchor"></a></h2>

<table>
 <tbody>
  <tr>
   <td>SVG Element</td>
   <td> <strong>Name</strong> </td>
   <td> <strong>Release</strong> </td>
   <td> <strong>Implementation notes</strong> </td>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td><code>&lt;circle&gt;</code> </td>
   <td> Circle </td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  </tr>
  <tr>
   <td><code>&lt;clipPath&gt;</code></td>
   <td> Clipping paths </td>
   <td> 1.0</td>
   <td> Fully supported except that <code>&lt;textPath&gt;</code> elements cannot be used in clip paths. </td>
  </tr>
  <tr>
   <td><code>&lt;defs&gt;</code></td>
   <td> Definitions</td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  </tr>
  <tr>
   <td><code>&lt;desc&gt;</code></td>
   <td> Description</td>
   <td> 1.0</td>
   <td> Supported for the root <code>&lt;svg&gt;</code> element only. </td>
  </tr>
  <tr>
   <td><code>&lt;ellipse&gt;</code></td>
   <td> Ellipse</td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  </tr>
  <tr>
   <td><code>&lt;g&gt;</code></td>
   <td> Group</td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  </tr>
  <tr>
   <td><code>&lt;image&gt;</code></td>
   <td> Embed an image </td>
   <td> 1.0</td>
   <td> Fully supported for bitmaps only (including data URLs). Embedding of external SVG documents is not supported. </td>
  </tr>
  <tr>
   <td><code>&lt;line&gt;</code></td>
   <td> Line</td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>&lt;linearGradient&gt;</code> </td>
   <td> Linear gradient</td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>&lt;marker&gt;</code> </td>
   <td> Marker </td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>&lt;mask&gt;</code></td>
   <td> Mask</td>
   <td> 1.0</td>
   <td> Fully supported.  Was only available for <code>renderToCanvas()</code> in versions prior to 1.3. </td>
  <tr>
  <tr>
   <td><code>&lt;path&gt;</code></td>
   <td> Path</td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>&lt;pattern&gt;</code></td>
   <td> Pattern</td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>&lt;polygon&gt;</code></td>
   <td> Polygon</td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>&lt;polyline&gt;</code></td>
   <td> Polyline</td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>&lt;radialGradient&gt;</code> </td>
   <td> Radial gradient</td>
   <td> 1.0</td>
   <td> Fully supported except for <code>fx</code> and <code>fy</code> attributes. SVG radial gradients allow you to specify a focus point (fx,fy) that is distinct from the centre point (cx,cy), but radial gradients in the Android 2D drawing library do not support this feature. </td>
  <tr>
  <tr>
   <td><code>&lt;rect&gt;</code></td>
   <td> Rectangle</td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>&lt;solidColor&gt;</code> </td>
   <td> Solid colour references</td>
   <td> 1.2</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>&lt;stop&gt;</code></td>
   <td> Gradient stop</td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>&lt;style&gt;</code></td>
   <td> CSS stylesheet </td>
   <td> 1.1</td>
   <td> Supported with some limitations. Seel below.</td>
  <tr>
  <tr>
   <td><code>&lt;svg&gt;</code></td>
   <td> SVG</td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>&lt;switch&gt;</code> </td>
   <td> Conditional processing </td>
   <td> 1.0</td>
   <td> Fully supported except that AndroidSVG does not support extensions so <code>requiredExtensions</code> is not supported, but the others are (including those defined in SVG 1.2 Tiny). </td>
  <tr>
  <tr>
   <td><code>&lt;symbol&gt;</code> </td>
   <td> Symbol </td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>&lt;text&gt;</code></td>
   <td> Text</td>
   <td> 1.0</td>
   <td> Good support. The most common features are supported but not more advanced features like fonts, glyphs and individual character transforms.</td>
  <tr>
  <tr>
   <td><code>&lt;textPath&gt;</code></td>
   <td> Text on a path </td>
   <td> 1.0</td>
   <td> Basic support. <code>&lt;textPath&gt;</code> elements can not be pattern filled or used in clipping paths. </td>
  <tr>
  <tr>
   <td><code>&lt;title&gt;</code></td>
   <td> Title</td>
   <td> 1.0</td>
   <td> Supported for the root <code>&lt;svg&gt;</code> element only. </td>
  <tr>
  <tr>
   <td><code>&lt;tref&gt;</code></td>
   <td> Text reference </td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>&lt;tspan&gt;</code></td>
   <td> Text span</td>
   <td> 1.0</td>
   <td> Supported (see <code>&lt;text&gt;</code>). </td>
  <tr>
  <tr>
   <td><code>&lt;use&gt;</code></td>
   <td> Re-use a predefined object </td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>&lt;view&gt;</code></td>
   <td> Document view</td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  </tr>
 </tbody>
</table>


<h2><a name="Style_attributes"></a>Style attributes</h2>

<table>
 <tbody>
  <tr>
   <td>Attribute</td>
   <td> <strong>Release</strong> </td>
   <td> <strong>Implementation notes</strong> </td>
  <tr>
  <tr>
   <td><code>clip</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>clip-path</code> </td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>clip-rule</code> </td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>display</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>fill</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>fill-rule</code> </td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>fill-opacity</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>color</code> </td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>font</code></td>
   <td> 1.0</td>
   <td> SVG fonts not are supported but you can load external font files (eg. TTF fonts) using the <code>SVGExternalFileResolver</code> class.. </td>
  <tr>
  <tr>
   <td><code>font-family</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>font-size</code> </td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>font-weight</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>font-style</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>marker</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>marker-start</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>marker-mid</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>marker-end</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>mask</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>opacity</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>overflow</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>stop-color</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>stop-opacity</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>stroke</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>stroke-opacity</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>stroke-width</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>stroke-linecap</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>stroke-linejoin</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>stroke-miterlimit</code> </td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>stroke-dasharray</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>stroke-dashoffset</code> </td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>text-anchor</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>text-decoration</code></td>
   <td> 1.0</td>
   <td> Fully supported. Due to an Android bug, Underlines and strikethroughs will not be stroked on pre Jellybean 4.2 devices. </td>
  <tr>
  <tr>
   <td><code>vector-effect</code> </td>
   <td> 1.2</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>viewport-fill</code> </td>
   <td> 1.2</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>viewport-fill-opacity</code> </td>
   <td> 1.2</td>
   <td> Fully supported. </td>
  <tr>
  <tr>
   <td><code>visibility</code></td>
   <td> 1.0</td>
   <td> Fully supported. </td>
  </tr>
 </tbody>
</table>



<h2><a name="CSS_support"></a>CSS support<a href="#CSS_support" class="section_anchor"></a></h2>

<p>
CSS support via the <code>&lt;style&gt;</code> element was added in version 1.1 of AndroidSVG.  Most features of CSS 3 are implemented with a few exceptions.
</p>

<h3><a name="The_<style>_element"></a>The <code>&lt;style&gt;</code> element</h3>

<p>
The <code>&lt;style&gt;</code> element attributes <code>type</code> and <code>media</code> are supported.
</p>

<h3><a name="Selectors"></a>Selectors</h3>

<p>
Almost all CSS3 selectors are supported except for attribute selectors.
</p>

<ul>
<li>Simple selectors like <code>E</code>, <code>E F</code>, <code>*</code>, <code>E.class</code>, <code>E#id</code> all work as expected.</li>
<li>The <code>E &gt; F</code> and <code>E + F</code> combinators are supported.</li>
<li>All CSS3 pseudo classes, like <code>E:first-child</code> and <code>E:nth-child2n+1)</code>, are supported.  However, those that only make sense for HTML always return false.</li>
<li><code>E[id="foo"]</code> and <code>E[class="foo"]</code> are supported, but matching on other attributes will not work.</li>
<li>Pseudo elements like <code>:before</code> and <code>:after</code> are not supported.  They are not applicable to SVG files anyway.</li>
</ul>


<h3><a name="&quot;At&quot;_rules"></a>"At" rules</h3>

<p>
<code>@media</code> and <code>@import</code> are supported, but other rules like <code>@charset</code> are not.
</p>
 




        
        </section>
      </div>
    </div>

    <!-- FOOTER  -->
    <div id="footer_wrap" class="outer">
      <footer class="inner">
        <p class="copyright">AndroidSVG maintained by <a href="https://github.com/BigBadaboom">Paul LeBeau</a></p>
        <p>Published with <a href="https://pages.github.com">GitHub Pages</a></p>
      </footer>
    </div>

  </body>
</html>
